class SingleTon{
    private static SingleTon instance = new SingleTon() ;
    private SingleTon(){}
    public static SingleTon getInstance(){
        return  instance;
    }
}
class SignleTonLazy{
    public static String loker1  = new String();
    private static volatile SignleTonLazy instance = null;
    private SignleTonLazy(){}
    public static SignleTonLazy getInstance(){
        if(instance == null){
            synchronized (loker1){
                if(instance == null){
                    instance = new SignleTonLazy();
                }
            }
        }
        return instance;
    }
}

public class Demo20 {
}
